#ifndef	DESTROYERSTRATEGY_H
#define DESTROYERSTRATEGY_H

#pragma once

#include "../../ToolkitLayer.h"
#include <LDF/VisComponentStrategy.h>


/**
 * This strategy defines a button that destroys a VisComponent object
 * that is droped over it.
 *
 * @author Fabricio Anastacio - fabriciocfa@yahoo.com
 * @since August 28, 2007
 */
class TOOLKITLAYER_API DestroyerStrategy : public VisComponentStrategy
{
	// Attributes
protected:
	/** The list of the identifiers of the child components that were warned
	 * to prepare to die. */
	std::vector<unsigned long> warnedComponentIDs;
	/** The lst of the identifiers of the child components that are ready to die. */
	std::vector<unsigned long> readyComponentIDs;


	// Methods
public:
	/**
	 * Constructs a destroyer strategy with the image given by the specified
	 * texture name.
	 */
	DestroyerStrategy();
	/**
	 * Destroys this strategy.
	 */
	~DestroyerStrategy(void);

protected:
	/**
	 * Performs a given action before rendering the component.
	 */
	void process();
	/**
	 * Handles the given event.
	 *
	 * @param evt the event to be handled.
	 */
	void onEvent(LargeDisplayEvent* evt);

};

#endif // DESTROYERSTRATEGY_H
